//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<common_vertex_decl.cpp>
///	@path	~/src/graphics/common/
///	@date	2009/01/11
///	@desc	.

#include "config/config.h"

#include "graphics/common/common_vertex_decl.h"

namespace xeres {

	namespace vd
	{
		// decl
		const std::vector<VertexSlotDeclaration>& vd::ScreenColor::decl( void )
		{
			static std::vector<VertexSlotDeclaration> s_decl;
			if( s_decl.empty() )
			{
				s_decl.push_back( VertexSlotDeclaration( 0	, 0 , VertexSlotType_Float4 , "POSITIONT" ) );
				s_decl.push_back( VertexSlotDeclaration( 16 , 0 , VertexSlotType_ColorRGBA , "COLOR" ) );
			}
			return s_decl;
		}
		// decl
		const std::vector<VertexSlotDeclaration>& ScreenTexture::decl( void )
		{
			static std::vector<VertexSlotDeclaration> s_decl;
			if( s_decl.empty() )
			{
				s_decl.push_back( VertexSlotDeclaration( 0	, 0 , VertexSlotType_Float4 , "POSITIONT" ) );
				s_decl.push_back( VertexSlotDeclaration( 16 , 0 , VertexSlotType_Float2 , "TEXCOORD" ) );
			}
			return s_decl;
		}
		// decl
		const std::vector<VertexSlotDeclaration>& ScreenColorTexture::decl( void )
		{
			static std::vector<VertexSlotDeclaration> s_decl;
			if( s_decl.empty() )
			{
				s_decl.push_back( VertexSlotDeclaration( 0	, 0 , VertexSlotType_Float4 , "POSITIONT" ) );
				s_decl.push_back( VertexSlotDeclaration( 16 , 0 , VertexSlotType_ColorRGBA , "COLOR" ) );
				s_decl.push_back( VertexSlotDeclaration( 20 , 0 , VertexSlotType_Float2 , "TEXCOORD" ) );
			}
			return s_decl;
		}
	}

} // namespace xeres

